package Test;

public class B extends A{
    String name = "2";

    @Override
    public void test1(){
        System.out.println("===part2===");
    }

    //方法重写
    @Override
    public void print1(){
        System.out.println("666");
    }

    @Override
    public void print2(int a){
        System.out.println("666666");
    }


    //super用法
    public void test(){
        System.out.println(super.name);
        System.out.println(name);

        super.test1();
        super.print1();
        super.print2(1);

        test1();
        print1();
        print2(2);
    }
}
